Implementing Circularity Using Partial Evaluation
نویسنده
چکیده
Complex data dependencies can often be expressed concisely by defining a variable in terms of part of its own value. Such a circular reference can be naturally expressed in a lazy functional language or in an attribute grammar. In this paper, we consider circular references in the context of an imperative C-like language, by extending the language with a new construct, persistent variables. We show that an extension of partial evaluation can eliminate persistent variables, producing a staged C program. This approach has been implemented in the Tempo specializer for C programs, and has proven useful in the implementation of run-time specialization.
منابع مشابه
Hygienic Quasiquotation in Scheme Distilled Tutorial
Quasiquotation in Scheme is nearly ideal for implementing programs that generate other programs. These programs lack only the ability to generate fresh bound identifiers, as required to make such code-manipulating programs hygienic, but any Scheme programmer knows how to provide this ability using gensym. In this tutorial we investigate hygienic quasiquotation in Scheme and in languages influen...
متن کاملNew parameter of roundness R: circularity corrected by aspect ratio
In this paper, we propose a new roundness parameter R, to denote circularity corrected by aspect ratio. The basic concept of this new roundness parameter is given by the following equation: R = Circularity + (Circularity perfect circle Circularity aspect ratio) where Circularityperfect circle is the maximum value of circularity and Circularityaspect ratio is the circularity when only the aspect...
متن کاملThe Evaluation of Tools Used to Predict the Impact of Missense Variants Is Hindered by Two Types of Circularity
Prioritizing missense variants for further experimental investigation is a key challenge in current sequencing studies for exploring complex and Mendelian diseases. A large number of in silico tools have been employed for the task of pathogenicity prediction, including PolyPhen-2, SIFT, FatHMM, MutationTaster-2, MutationAssessor, Combined Annotation Dependent Depletion, LRT, phyloP, and GERP++,...
متن کاملClinical and paraclinical evaluation of partial nephrectomy using laparoscopy and open surgery in dogs: new suturing technique
Partial nephrectomy, using open surgery or laparoscopy, is a standard surgical approach to treat renal disorders. The objective of this study was to compare and evaluate the feasibility and safety of laparoscopic partial nephrectomy using figure eight ligation technique. Mixed-breed dogs were randomly dedicated for partial nephrectomy using laparoscopy (n=6) and open surgery (n=6). During 30 da...
متن کاملImplementing Memoization for Partial Evaluation
Memoization is a key ingredient in every partial evaluator. It enables folding by caching previously specialized functions. It is essential to make polyvariant specialization terminate. Its implementation is reasonably straightforward in a standard specializer that represents functions by closures. With the advent of handwritten program-generator generators (PGGs), implementing memoization gets...
متن کامل